package web.fabrimind.dm.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import web.fabrimind.common.annotation.Excel;
import web.fabrimind.common.core.domain.BaseEntity;

/**
 * 设备管理对象 equipment
 * 
 * @author 智慧
 * @date 2025-03-25
 */
public class Equipment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 设备ID */
    private Long equipmentId;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String equipmentName;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String equipmentCode;

    /** 设备类型 */
    @Excel(name = "设备类型")
    private String equipmentType;

    /** 所属生产线ID */
    @Excel(name = "所属生产线ID")
    private Long lineId;

    /** 设备状态（0:停用 1:正常 2:维修中） */
    @Excel(name = "设备状态", readConverterExp = "0=:停用,1=:正常,2=:维修中")
    private String status;

    /** 制造商 */
    @Excel(name = "制造商")
    private String manufacturer;

    /** 购买日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "购买日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date purchaseDate;

    /** 保修期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保修期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date warrantyPeriod;

    /** 维护周期(天) */
    @Excel(name = "维护周期(天)")
    private Long maintenanceCycle;

    /** 上次维护时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上次维护时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastMaintenance;

    /** 所属生产线名称 */
    @Excel(name = "所属生产线名称")
    private String lineName;


    public String getLineName() {
        return lineName;
    }

    public void setLineName(String lineName) {
        this.lineName = lineName;
    }

    public void setEquipmentId(Long equipmentId)
    {
        this.equipmentId = equipmentId;
    }

    public Long getEquipmentId() 
    {
        return equipmentId;
    }
    public void setEquipmentName(String equipmentName) 
    {
        this.equipmentName = equipmentName;
    }

    public String getEquipmentName() 
    {
        return equipmentName;
    }
    public void setEquipmentCode(String equipmentCode) 
    {
        this.equipmentCode = equipmentCode;
    }

    public String getEquipmentCode() 
    {
        return equipmentCode;
    }
    public void setEquipmentType(String equipmentType) 
    {
        this.equipmentType = equipmentType;
    }

    public String getEquipmentType() 
    {
        return equipmentType;
    }
    public void setLineId(Long lineId) 
    {
        this.lineId = lineId;
    }

    public Long getLineId() 
    {
        return lineId;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setManufacturer(String manufacturer) 
    {
        this.manufacturer = manufacturer;
    }

    public String getManufacturer() 
    {
        return manufacturer;
    }
    public void setPurchaseDate(Date purchaseDate) 
    {
        this.purchaseDate = purchaseDate;
    }

    public Date getPurchaseDate() 
    {
        return purchaseDate;
    }
    public void setWarrantyPeriod(Date warrantyPeriod) 
    {
        this.warrantyPeriod = warrantyPeriod;
    }

    public Date getWarrantyPeriod() 
    {
        return warrantyPeriod;
    }
    public void setMaintenanceCycle(Long maintenanceCycle) 
    {
        this.maintenanceCycle = maintenanceCycle;
    }

    public Long getMaintenanceCycle() 
    {
        return maintenanceCycle;
    }
    public void setLastMaintenance(Date lastMaintenance) 
    {
        this.lastMaintenance = lastMaintenance;
    }

    public Date getLastMaintenance() 
    {
        return lastMaintenance;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("equipmentId", getEquipmentId())
            .append("equipmentName", getEquipmentName())
            .append("equipmentCode", getEquipmentCode())
            .append("equipmentType", getEquipmentType())
            .append("lineId", getLineId())
            .append("status", getStatus())
            .append("manufacturer", getManufacturer())
            .append("purchaseDate", getPurchaseDate())
            .append("warrantyPeriod", getWarrantyPeriod())
            .append("maintenanceCycle", getMaintenanceCycle())
            .append("lastMaintenance", getLastMaintenance())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("lineName", getLineName())
            .toString();
    }
}
